.image-viewer-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.image-viewer-container.visible {
  opacity: 1;
}

.viewer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 1001;
}

.viewer-content {
  position: relative;
  z-index: 1002;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.viewer-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1004;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 80%, rgba(0,0,0,0) 100%);
  backdrop-filter: blur(8px);
}

.image-counter {
  color: white;
  font-size: 16px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.header-btn {
  color: white !important;
  border: none;
  background: transparent !important;
  border-radius: 50%;
  height: 36px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.image-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1003;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.image-transform-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  position: relative;
}

.viewer-img {
  max-width: 100%;
  max-height: 100%;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.viewer-img.dragging {
  cursor: grabbing !important;
}

.zoom-controls {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1005;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.zoom-controls .ant-btn {
  color: white !important;
  border: none;
  background: transparent !important;
  border-radius: 50%;
  margin: 0 2px;
}

.zoom-controls .ant-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1005;
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(4px);
  color: white !important;
  border: none !important;
  width: 44px;
  height: 44px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prev-button {
  left: 20px;
}

.next-button {
  right: 20px;
}

.nav-button:hover {
  background-color: rgba(0, 0, 0, 0.7) !important;
}

.viewer-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1004;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 80%, rgba(0,0,0,0) 100%);
  backdrop-filter: blur(8px);
}

.image-name {
  color: white;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-actions {
  display: flex;
  gap: 8px;
}

.footer-btn {
  color: white !important;
  border: none;
  background: transparent !important;
  font-size: 18px;
  border-radius: 8px; 
  height: 40px;
  min-width: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color 0.2s ease;
}

.footer-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.footer-btn span {
  font-size: 14px;
  line-height: 1;
}

.footer-btn .anticon + span {
  display: inline-block;
  min-width: 16px;
  text-align: center;
}

.image-info-drawer {
  position: absolute !important;
  z-index: 1050 !important;
}

.image-info-drawer .ant-drawer-mask {
  background-color: transparent !important;
}

.image-info-drawer .ant-drawer-header {
  background-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(240, 240, 240, 0.6);
}

.drawer-content {
  padding: 16px 0;
}

.image-title-section {
  margin-bottom: 16px;
}

.image-title-section h4 {
  margin-bottom: 4px;
}

.image-description-section {
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(249, 249, 249, 0.5) !important;
  border-radius: 4px;
  backdrop-filter: blur(10px) !important;
}

.image-tags-section {
  margin-bottom: 16px;
}

.tag-title {
  margin-bottom: 8px;
  font-weight: 500;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exif-description {
  font-size: 13px;
}

.exif-description .ant-descriptions-item-label {
  width: 100px;
}

.image-specs-section {
  margin: 16px 0;
  padding: 16px;
  background: rgba(247, 249, 250, 0.5) !important;
  border-radius: 8px;
  backdrop-filter: blur(10px) !important;
}

.specs-container {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.spec-item {
  flex: 1;
  padding: 0 8px;
}

.spec-value {
  font-size: 16px;
  font-weight: 500;
  color: #262626;
  margin-bottom: 4px;
}

.spec-label {
  font-size: 12px;
  color: #8c8c8c;
}

.exif-sections {
  margin-top: 20px;
}

.exif-category {
  margin-bottom: 24px;
}

.exif-category .ant-divider {
  margin: 16px 0;
}

.exif-description {
  font-size: 13px;
}

.exif-description .ant-descriptions-item-label {
  width: 90px;
  font-weight: 500;
}

.image-info-drawer .ant-drawer-body {
  padding: 24px 20px;
}

.exif-description .ant-descriptions-view {
  background-color: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(10px) !important;
}

.exif-description .ant-descriptions-row > th,
.exif-description .ant-descriptions-row > td {
  padding: 12px 16px;
}

.image-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1004;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-text {
  color: white;
  font-size: 14px;
  margin-top: 12px;
}

.image-loading-spinner .ant-spin {
  color: white;
}

.image-loading-spinner .ant-spin-dot-item {
  background-color: white;
}

.face-detection-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1004;
}

.face-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.face-highlight {
  position: absolute;
  border: 2px solid #1890ff;
  border-radius: 4px;
  background-color: transparent;
  box-shadow: 0 0 10px rgba(24, 144, 255, 0.5);
  z-index: 2;
  animation: faceHighlight 1.5s ease-in-out infinite alternate;
}

@keyframes faceHighlight {
  0% {
    border-color: #1890ff;
    box-shadow: 0 0 10px rgba(24, 144, 255, 0.5);
  }
  100% {
    border-color: #52c41a;
    box-shadow: 0 0 15px rgba(82, 196, 26, 0.7);
  }
}

.face-label {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(24, 144, 255, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.face-confidence {
  opacity: 0.8;
  font-size: 10px;
}
